<template>
  <div>
    <audio ref="audio" autoplay="true"></audio>
  </div>
</template>
<script>
export default {
  props: {
    track: { type: Object, default: null },
    
  },
  data() {
    return {
    };
  },
  created() {},
  methods: {
    _mountTrack() {
      if (this.track) {
        this.track.attach(this.$refs.audio);
      }
    }
  },
  mounted() {
    this._mountTrack();
  },
  watch: {
    track() {
      this._mountTrack();
    }
  },
  computed: {
  }
};
</script>
<style scoped>

</style>
